<?php
class ControllerModuleWelcomepopup extends Controller {
	protected function index() {
		
		$this->language->load('module/welcomepopup');
		$this->data['text_noshow'] = $this->language->get('text_noshow');
		
		$this->document->addStyle('catalog/view/javascript/jquery/colorbox.css');
		$this->document->addScript('catalog/view/javascript/jquery/jquery.colorbox.js');
        
		$this->data['status'] = $this->config->get('welcomepopup_status');
        $this->data['mode'] = $this->config->get('welcomepopup_mode');
        $this->data['cookie'] = $this->config->get('welcomepopup_cookie');
        $this->data['info_id'] = $this->config->get('welcomepopup_page');
        
		$this->load->model('catalog/syscontent');
		$syscontent_info = $this->model_catalog_syscontent->getsyscontent($this->config->get('welcomepopup_page'));
		$this->data['description'] = html_entity_decode($syscontent_info['description']);

		$this->id = 'welcomepopup';

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/welcomepopup.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/welcomepopup.tpl';
		} else {
			$this->template = 'default/template/module/welcomepopup.tpl';
		}

		$this->render();
    }
}
?>